package com.sbtr.business.feature.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import java.io.Serializable;

import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import io.swagger.annotations.ApiModel;


/**
 * 缺失值处理字段列表 实体类
 *
 * @author dgl
 * @since 2023-03-17
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@TableName("f_fe_missing_rule")
@ApiModel(value="FeMissingRule对象", description="缺失值处理字段列表")
public class FeMissingRule extends Model<FeMissingRule> {

    @ApiModelProperty(value = "id")
    @TableId(value = "id")
    private Long id;

    @ApiModelProperty(value = "填充规则:数值填充（最大值、最小值、平均值、中位数、众数、不填充、自定义值等）；日期类型填充（自定义日期）；文本类型填充（最少频次、最多频次、自定义）")
    private String missing;

    @ApiModelProperty(value = "填充类型:数值类（整数型、浮点型）、日期型、时间型、文本型")
    private String missingType;

    @ApiModelProperty(value = "填充值:除了自定义均需计算所得")
    private String value;

    @ApiModelProperty(value = "所属处理链id:特征处理链f_fe_operator表的ID")
    private Long processingId;

    @ApiModelProperty(value = "原始数据字段ID:fe_datafield表ID")
    private Long datafieldId;

    @ApiModelProperty(value = "原始数据字段类型:整数型、浮点型、日期型、时间型、文本型")
    private String type;

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")// 后台传数据到前台
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") //前台传数据到后台
    private Date createTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
